<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user', function (Blueprint $table) {
            $table->integer('id',10)->comment('ID');
            $table->string('departmentid',10)->comment('部门ID');
            $table->string('number',100)->comment('员工编号');
            $table->string('nike',100)->comment('昵称');
            $table->string('name',100)->comment('名称');
            $table->string('password',100)->comment('密码');
            $table->string('status')->comment('是否有效 0：账号失效 1：生效中');
            $table->string('grade',4)->comment('等级');
            $table->string('addtime',100)->comment('添加时间');
        });
        DB::statement("alter table `user` comment '用户表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user');
    }
}
